/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef OHCRYPTO_KDF_TEST_H
#define OHCRYPTO_KDF_TEST_H

#include "crypto_common.h"
#include "crypto_kdf.h"

#define OHTEST_MD5_DIGIESTSIZE 16
#define OHTEST_SHA1_DIGIESTSIZE 20
#define OHTEST_SHA224_DIGIESTSIZE 28
#define OHTEST_SHA256_DIGIESTSIZE 32
#define OHTEST_SHA384_DIGIESTSIZE 48
#define OHTEST_SHA512_DIGIESTSIZE 64
#define OHTEST_SM3_DIGIESTSIZE 32

#define OHTEST_KDF_CONSTANT_LEN 255

typedef struct {
    uint8_t *password;
    uint8_t *salt;
    int iterations;
} paramPbkdf2Spec;

typedef struct {
    uint8_t *key;
    uint8_t *salt;
    uint8_t *info;
} paramHkdfSpec;

typedef struct {
    uint8_t *key;
    uint8_t *info;
} paramX963Spec;

typedef struct {
    uint8_t *passphrase;
    uint8_t *salt;
    uint64_t n;
    uint64_t p;
    uint64_t r;
    uint64_t max_mem;
} paramScryptSpec;

typedef struct {
    uint8_t *password;
    size_t passLen;
    uint8_t *salt;
    size_t saltLen;
    int iterations;
} paramVectorPbkdf2Spec;

typedef struct {
    uint8_t *key;
    size_t keyLen;
    uint8_t *salt;
    size_t saltLen;
    uint8_t *info;
    size_t infoLen;
} paramVectorHkdfSpec;

typedef struct {
    uint8_t *passphrase;
    size_t passLen;
    uint8_t *salt;
    size_t saltLen;
    uint64_t n;
    uint64_t p;
    uint64_t r;
    uint64_t max_mem;
} paramVectorScryptSpec;

typedef struct {
    uint8_t *key;
    size_t keyLen;
    uint8_t *info;
    size_t infoLen;
} paramVectorX963Spec;

typedef union {
    paramPbkdf2Spec pbkdf2Params;
    paramHkdfSpec hkdfParams;
    paramScryptSpec scryptParams;
    paramX963Spec x963Params;
} paramsSpec;

typedef union {
    paramVectorPbkdf2Spec pbkdf2Params;
    paramVectorHkdfSpec hkdfParams;
    paramVectorScryptSpec scryptParams;
    paramVectorX963Spec x963Params;
} paramsVectorSpec;

typedef enum {
    OHTEST_KDF_PBKDF2 = 0,
    OHTEST_KDF_HKDF,
    OHTEST_KDF_SCRYPT,
    OHTEST_KDF_X963,
    OHTEST_KDF_MAX = 16,
} KdfType;

typedef struct {
    KdfType kdfType;
    const char *algoName;
    int keySize;
    paramsSpec params;
} KdfSpec;

typedef struct {
    KdfType kdfType;
    const char *algoName;
    int keySize;
    paramsVectorSpec params;
    uint8_t *expectSecret;
} KdfVectorSpec;

/* PBKDF2 SHA1 VECTOR */
static uint8_t pbhdf2_sha1_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64
};
static uint8_t pbhdf2_sha1_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sha1_expectSecret[] = {
    0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0,
    0xd8, 0xde, 0x89, 0x57
};
/* PBKDF2 SHA224 VECTOR */
static uint8_t pbhdf2_sha224_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64
};
static uint8_t pbhdf2_sha224_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sha224_expectSecret[] = {
    0x3c, 0x19, 0x8c, 0xbd, 0xb9, 0x46, 0x4b, 0x78, 0x57, 0x96, 0x6b, 0xd0, 0x5b, 0x7b, 0xc9, 0x2b,
    0xc1, 0xcc, 0x4e, 0x6e
};
/* PBKDF2 SHA256 VECTOR */
static uint8_t pbhdf2_sha256_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x64
};
static uint8_t pbhdf2_sha256_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sha256_expectSecret[] = {
    0x55, 0xac, 0x04, 0x6e, 0x56, 0xe3, 0x08, 0x9f, 0xec, 0x16, 0x91, 0xc2, 0x25, 0x44, 0xb6, 0x05,
    0xf9, 0x41, 0x85, 0x21, 0x6d, 0xde, 0x04, 0x65, 0xe6, 0x8b, 0x9d, 0x57, 0xc2, 0x0d, 0xac, 0xbc,
    0x49, 0xca, 0x9c, 0xcc, 0xf1, 0x79, 0xb6, 0x45, 0x99, 0x16, 0x64, 0xb3, 0x9d, 0x77, 0xef, 0x31,
    0x7c, 0x71, 0xb8, 0x45, 0xb1, 0xe3, 0x0b, 0xd5, 0x09, 0x11, 0x20, 0x41, 0xd3, 0xa1, 0x97, 0x83
};
/* PBKDF2 SHA384 VECTOR */
static uint8_t pbhdf2_sha384_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64
};
static uint8_t pbhdf2_sha384_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sha384_expectSecret[] = {
    0xc0, 0xe1, 0x4f, 0x06, 0xe4, 0x9e, 0x32, 0xd7, 0x3f, 0x9f, 0x52, 0xdd, 0xf1, 0xd0, 0xc5, 0xc7,
    0x19, 0x16, 0x09, 0x23
};
/* PBKDF2 SHA512 VECTOR */
static uint8_t pbhdf2_sha512_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64
};
static uint8_t pbhdf2_sha512_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sha512_expectSecret[] = {
    0x86, 0x7f, 0x70, 0xcf, 0x1a, 0xde, 0x02, 0xcf, 0xf3, 0x75, 0x25, 0x99, 0xa3, 0xa5, 0x3d, 0xc4,
    0xaf, 0x34, 0xc7, 0xa6
};
/* PBKDF2 SM3 VECTOR */
static uint8_t pbhdf2_sm3_password[] = {
    0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64
};
static uint8_t pbhdf2_sm3_salt[] = {
    0x73, 0x61, 0x6c, 0x74
};
static uint8_t pbhdf2_sm3_expectSecret[] = {
    0x73, 0x8c, 0x8c, 0x43, 0x23, 0x72, 0xd9, 0x8a, 0x73, 0x35, 0x0b, 0xc2, 0x52, 0x20, 0x9e, 0x4c,
    0xf2, 0xac, 0xdd, 0xe7
};
/* HKDF SHA1 VECTOR */
static uint8_t hkdf_sha1_key[] = {
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b
};
static uint8_t hkdf_sha1_salt[] = {
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c
};
static uint8_t hkdf_sha1_info[] = {
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9
};
static uint8_t hkdf_sha1_expectSecret[] = {
    0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81,
    0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2,
    0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, 0xf8, 0x96
};
/* HKDF SHA224 VECTOR */
static uint8_t hkdf_sha224_key[] = {
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b
};
static uint8_t hkdf_sha224_salt[] = {
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c
};
static uint8_t hkdf_sha224_info[] = {
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9
};
static uint8_t hkdf_sha224_expectSecret[] = {
    0x7f, 0xc8, 0xae, 0x03, 0x35, 0xed, 0x46, 0x8c, 0xef, 0x56, 0xbe, 0x09, 0x1f, 0x64, 0x78, 0xa1,
    0xaa, 0xe8, 0x4c, 0x0d, 0xa5, 0x4c, 0xe5, 0x17, 0x6a, 0xa3, 0x89, 0x46, 0xc7, 0x9e, 0x21, 0x0e
};
/* HKDF SHA256 VECTOR */
static uint8_t hkdf_sha256_key[] = {
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b
};
static uint8_t hkdf_sha256_salt[] = {
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c
};
static uint8_t hkdf_sha256_info[] = {
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9
};
static uint8_t hkdf_sha256_expectSecret[] = {
    0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a,
    0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf,
    0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, 0x58, 0x65
};
/* HKDF SHA384 VECTOR */
static uint8_t hkdf_sha384_key[] = {
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b
};
static uint8_t hkdf_sha384_salt[] = {
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c
};
static uint8_t hkdf_sha384_info[] = {
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9
};
static uint8_t hkdf_sha384_expectSecret[] = {
    0xfb, 0x7e, 0x67, 0x43, 0xeb, 0x42, 0xcd, 0xe9, 0x6f, 0x1b, 0x70, 0x77, 0x89, 0x52, 0xab, 0x75,
    0x48, 0xca, 0xfe, 0x53, 0x24, 0x9f, 0x7f, 0xfe, 0x14, 0x97, 0xa1, 0x63, 0x5b, 0x20, 0x1f, 0xf1
};
/* HKDF SHA512 VECTOR */
static uint8_t hkdf_sha512_key[] = {
    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b
};
static uint8_t hkdf_sha512_salt[] = {
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c
};
static uint8_t hkdf_sha512_info[] = {
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9
};
static uint8_t hkdf_sha512_expectSecret[] = {
    0x74, 0x13, 0xe8, 0x99, 0x7e, 0x02, 0x06, 0x10, 0xfb, 0xf6, 0x82, 0x3f, 0x2c, 0xe1, 0x4b, 0xff,
    0x01, 0x87, 0x5d, 0xb1, 0xca, 0x55, 0xf6, 0x8c, 0xfc, 0xf3, 0x95, 0x4d, 0xc8, 0xaf, 0xf5, 0x35
};
/* HKDF SM3 VECTOR */
static uint8_t hkdf_sm3_key[] = {
    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};
static uint8_t hkdf_sm3_salt[] = {
    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};
static uint8_t hkdf_sm3_info[] = {
    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};
static uint8_t hkdf_sm3_expectSecret[] = {
    0xeb, 0xa1, 0x72, 0x2b, 0xd7, 0x9d, 0x3d, 0x00, 0x1e, 0xf1, 0x58, 0x2a, 0xd2, 0x3f, 0xf8, 0xda
};
/* X963 SHA1 VECTOR */
static uint8_t x963_sha1_info[] = {
    /* SharedInfo for first vector - 16 bytes */
    0x85, 0x6a, 0x53, 0xf3, 0xe3, 0x6a, 0x26, 0xbb, 0xc5, 0x79, 0x28, 0x79, 0xf3, 0x07, 0xcc, 0xe2
};
static uint8_t x963_sha1_key[] = {
    /* First vector Z (shared secret) - 24 bytes (128-byte output) */
    0xfd, 0x17, 0x19, 0x8b, 0x89, 0xab, 0x39, 0xc4, 0xab, 0x5d, 0x7c, 0xca, 0x36, 0x3b, 0x82, 0xf9,
    0xfd, 0x7e, 0x23, 0xc3, 0x98, 0x4d, 0xc8, 0xa2
};
static uint8_t x963_sha1_key2[] = {
    /* Second vector Z (shared secret) - 24 bytes (16-byte output) */
    0x1c, 0x7d, 0x7b, 0x5f, 0x05, 0x97, 0xb0, 0x3d, 0x06, 0xa0, 0x18, 0x46, 0x6e, 0xd1, 0xa9, 0x3e,
    0x30, 0xed, 0x4b, 0x04, 0xdc, 0x64, 0xcc, 0xdd
};
static uint8_t x963_sha1_expectSecret[] = {
    /* First vector expected derived key - 128 bytes (1024 bits) */
    0x6e, 0x5f, 0xad, 0x86, 0x5c, 0xb4, 0xa5, 0x1c, 0x95, 0x20, 0x9b, 0x16, 0xdf, 0x0c, 0xc4, 0x90,
    0xbc, 0x2c, 0x90, 0x64, 0x40, 0x5c, 0x5b, 0xcc, 0xd4, 0xee, 0x48, 0x32, 0xa5, 0x31, 0xfb, 0xe7,
    0xf1, 0x0c, 0xb7, 0x9e, 0x2e, 0xab, 0x6a, 0xb1, 0x14, 0x9f, 0xbd, 0x5a, 0x23, 0xcf, 0xda, 0xbc,
    0x41, 0x24, 0x22, 0x69, 0xc9, 0xdf, 0x22, 0xf6, 0x28, 0xc4, 0x42, 0x43, 0x33, 0x85, 0x5b, 0x64,
    0xe9, 0x5e, 0x2d, 0x4f, 0xb8, 0x46, 0x9c, 0x66, 0x9f, 0x17, 0x17, 0x6c, 0x07, 0xd1, 0x03, 0x37,
    0x6b, 0x10, 0xb3, 0x84, 0xec, 0x57, 0x63, 0xd8, 0xb8, 0xc6, 0x10, 0x40, 0x9f, 0x19, 0xac, 0xa8,
    0xeb, 0x31, 0xf9, 0xd8, 0x5c, 0xc6, 0x1a, 0x8d, 0x6d, 0x4a, 0x03, 0xd0, 0x3e, 0x5a, 0x50, 0x6b,
    0x78, 0xd6, 0x84, 0x7e, 0x93, 0xd2, 0x95, 0xee, 0x54, 0x8c, 0x65, 0xaf, 0xed, 0xd2, 0xef, 0xec
};
static uint8_t x963_sha1_expectSecret2[] = {
    /* Second vector expected derived key - 16 bytes (128 bits) */
    0xbf, 0x71, 0xdf, 0xfd, 0x8f, 0x4d, 0x99, 0x22, 0x39, 0x36, 0xbe, 0xb4, 0x6f, 0xee, 0x8c, 0xcc
};
/* X963 SHA224 VECTOR */
static uint8_t x963_sha224_info[] = {
    /* SharedInfo for first vector - 16 bytes */
    0x72, 0x79, 0x97, 0xae, 0xd5, 0x3e, 0x78, 0xf7, 0x4b, 0x1d, 0x66, 0x74, 0x3a, 0x4e, 0xa4, 0xd2
};
static uint8_t x963_sha224_key[] = {
    /* First vector Z (shared secret) - 24 bytes (128-byte output) */
    0xda, 0x67, 0xa7, 0x30, 0x72, 0xd5, 0x21, 0xa8, 0x27, 0x2c, 0x69, 0x02, 0x35, 0x73, 0x01, 0x2d,
    0xdf, 0x9b, 0x46, 0xbf, 0xf6, 0x5b, 0x39, 0x00
};
static uint8_t x963_sha224_key2[] = {
    /* Second vector Z (shared secret) - 24 bytes (16-byte output) */
    0x9b, 0xa3, 0x22, 0x6b, 0xa0, 0xfc, 0xa6, 0xbd, 0x5d, 0xda, 0xef, 0x5b, 0x8d, 0x76, 0x3a, 0x4d,
    0x33, 0x03, 0xbc, 0x25, 0x8d, 0x90, 0x46, 0x8c
};
static uint8_t x963_sha224_expectSecret[] = {
    /* First vector expected derived key - 128 bytes (1024 bits) */
    0xdf, 0xc3, 0x12, 0x6c, 0x5e, 0xeb, 0xf9, 0xa5, 0x8d, 0x89, 0x73, 0x0e, 0x8d, 0x8f, 0xf7, 0xcc,
    0x77, 0x25, 0x92, 0xf2, 0x8c, 0x10, 0xb3, 0x49, 0xb4, 0x37, 0xd9, 0xd0, 0x68, 0x69, 0x8a, 0x22,
    0xe5, 0x32, 0xea, 0xe9, 0x75, 0xdf, 0xaf, 0x9c, 0x5c, 0x6a, 0x9f, 0x29, 0x35, 0xea, 0xfb, 0x05,
    0x35, 0x30, 0x13, 0xc2, 0x53, 0x44, 0x4e, 0x61, 0xf0, 0x7b, 0xc9, 0xdd, 0xd1, 0x59, 0x48, 0xe6,
    0x14, 0xbd, 0xc7, 0xe4, 0x45, 0xba, 0x3b, 0x18, 0x93, 0xf4, 0x2f, 0x87, 0xf1, 0x8f, 0xb3, 0x52,
    0xd4, 0x99, 0x56, 0x00, 0x9a, 0x64, 0x2c, 0x36, 0x2d, 0x45, 0x41, 0x0b, 0x43, 0xa9, 0xab, 0x37,
    0x6e, 0x92, 0x61, 0x21, 0x07, 0x39, 0x17, 0x47, 0x59, 0x51, 0x1d, 0x1f, 0x9e, 0x52, 0xf6, 0xec,
    0x73, 0xdf, 0xed, 0x44, 0x6d, 0xba, 0xfa, 0xf7, 0xfd, 0x1a, 0x57, 0x11, 0x3a, 0xbc, 0x2e, 0x8d
};
static uint8_t x963_sha224_expectSecret2[] = {
    /* Second vector expected derived key - 16 bytes (128 bits) */
    0x15, 0xcc, 0xbd, 0x7d, 0x6b, 0x8f, 0x91, 0x83, 0x35, 0x79, 0x9b, 0x39, 0x20, 0xe6, 0x9c, 0x1f
};
/* X963 SHA256 VECTOR */
static uint8_t x963_sha256_info[] = {
    /* SharedInfo for first vector - 16 bytes */
    0x75, 0xee, 0xf8, 0x1a, 0xa3, 0x04, 0x1e, 0x33, 0xb8, 0x09, 0x71, 0x20, 0x3d, 0x2c, 0x0c, 0x52
};
static uint8_t x963_sha256_key[] = {
    /* First vector Z (shared secret) - 24 bytes (128-byte output) */
    0x22, 0x51, 0x8b, 0x10, 0xe7, 0x0f, 0x2a, 0x3f, 0x24, 0x38, 0x10, 0xae, 0x32, 0x54, 0x13, 0x9e,
    0xfb, 0xee, 0x04, 0xaa, 0x57, 0xc7, 0xaf, 0x7d
};
static uint8_t x963_sha256_key2[] = {
    /* Second vector Z (shared secret) - 24 bytes (16-byte output) */
    0x96, 0xc0, 0x56, 0x19, 0xd5, 0x6c, 0x32, 0x8a, 0xb9, 0x5f, 0xe8, 0x4b, 0x18, 0x26, 0x4b, 0x08,
    0x72, 0x5b, 0x85, 0xe3, 0x3f, 0xd3, 0x4f, 0x08
};
static uint8_t x963_sha256_expectSecret[] = {
    /* First vector expected derived key - 128 bytes (1024 bits) */
    0xc4, 0x98, 0xaf, 0x77, 0x16, 0x1c, 0xc5, 0x9f, 0x29, 0x62, 0xb9, 0xa7, 0x13, 0xe2, 0xb2, 0x15,
    0x15, 0x2d, 0x13, 0x97, 0x66, 0xce, 0x34, 0xa7, 0x76, 0xdf, 0x11, 0x86, 0x6a, 0x69, 0xbf, 0x2e,
    0x52, 0xa1, 0x3d, 0x9c, 0x7c, 0x6f, 0xc8, 0x78, 0xc5, 0x0c, 0x5e, 0xa0, 0xbc, 0x7b, 0x00, 0xe0,
    0xda, 0x24, 0x47, 0xcf, 0xd8, 0x74, 0xf6, 0xcf, 0x92, 0xf3, 0x0d, 0x00, 0x97, 0x11, 0x14, 0x85,
    0x50, 0x0c, 0x90, 0xc3, 0xaf, 0x8b, 0x48, 0x78, 0x72, 0xd0, 0x46, 0x85, 0xd1, 0x4c, 0x8d, 0x1d,
    0xc8, 0xd7, 0xfa, 0x08, 0xbe, 0xb0, 0xce, 0x0a, 0xba, 0xbc, 0x11, 0xf0, 0xbd, 0x49, 0x62, 0x69,
    0x14, 0x2d, 0x43, 0x52, 0x5a, 0x78, 0xe5, 0xbc, 0x79, 0xa1, 0x7f, 0x59, 0x67, 0x6a, 0x57, 0x06,
    0xdc, 0x54, 0xd5, 0x4d, 0x4d, 0x1f, 0x0b, 0xd7, 0xe3, 0x86, 0x12, 0x8e, 0xc2, 0x6a, 0xfc, 0x21
};
static uint8_t x963_sha256_expectSecret2[] = {
    /* Second vector expected derived key - 16 bytes (128 bits) */
    0x44, 0x30, 0x24, 0xc3, 0xda, 0xe6, 0x6b, 0x95, 0xe6, 0xf5, 0x67, 0x06, 0x01, 0x55, 0x8f, 0x71
};
/* X963 SHA384 VECTOR */
static uint8_t x963_sha384_info[] = {
    /* SharedInfo for first vector - 16 bytes */
    0x13, 0x17, 0x50, 0x4a, 0xa3, 0x47, 0x59, 0xbb, 0x4c, 0x93, 0x1e, 0x3b, 0x78, 0x20, 0x19, 0x45
};
static uint8_t x963_sha384_key[] = {
    /* First vector Z (shared secret) - 24 bytes (128-byte output) */
    0xc0, 0x51, 0xfd, 0x22, 0x53, 0x9c, 0x9d, 0xe7, 0x91, 0xd6, 0xc4, 0x3a, 0x85, 0x4b, 0x8f, 0x80,
    0xa6, 0xbf, 0x70, 0x19, 0x00, 0x50, 0x85, 0x4a
};
static uint8_t x963_sha384_key2[] = {
    /* Second vector Z (shared secret) - 24 bytes (16-byte output) */
    0xd8, 0x55, 0x4d, 0xb1, 0xb3, 0x92, 0xcd, 0x55, 0xc3, 0xfe, 0x95, 0x7b, 0xed, 0x76, 0xaf, 0x09,
    0xc1, 0x3a, 0xc2, 0xa9, 0x39, 0x2f, 0x88, 0xf6
};
static uint8_t x963_sha384_expectSecret[] = {
    /* First vector expected derived key - 128 bytes (1024 bits) */
    0xcf, 0x6a, 0x84, 0x43, 0x47, 0x34, 0xac, 0x69, 0x49, 0xe1, 0xd7, 0x97, 0x67, 0x43, 0x27, 0x7b,
    0xe7, 0x89, 0x90, 0x69, 0x08, 0xad, 0x3c, 0xa3, 0xa8, 0x92, 0x3d, 0xa7, 0xf4, 0x76, 0xab, 0xbe,
    0xb5, 0x74, 0x30, 0x6d, 0x72, 0x43, 0x03, 0x1a, 0x85, 0x56, 0x69, 0x14, 0xbf, 0xd2, 0x47, 0xd2,
    0x51, 0x9c, 0x47, 0x99, 0x53, 0xd9, 0xd5, 0x5b, 0x6b, 0x83, 0x1e, 0x56, 0x26, 0x08, 0x06, 0xc3,
    0x9a, 0xf2, 0x1b, 0x74, 0xe3, 0xec, 0xf4, 0x70, 0xe3, 0xbd, 0x83, 0x32, 0x79, 0x1c, 0x8a, 0x23,
    0xc1, 0x33, 0x52, 0x51, 0x4f, 0xde, 0xf0, 0x0c, 0x2d, 0x1a, 0x40, 0x8b, 0xa3, 0x1b, 0x2d, 0x3f,
    0x9f, 0xdc, 0xb3, 0x73, 0x89, 0x54, 0x84, 0x64, 0x9a, 0x64, 0x5d, 0x18, 0x45, 0xee, 0xc9, 0x1b,
    0x5b, 0xfd, 0xc5, 0xad, 0x28, 0xc7, 0x82, 0x49, 0x84, 0x48, 0x20, 0x02, 0xdd, 0x4a, 0x86, 0x77
};
static uint8_t x963_sha384_expectSecret2[] = {
    /* Second vector expected derived key - 16 bytes (128 bits) */
    0x67, 0x1a, 0x46, 0xaa, 0xda, 0x14, 0x51, 0x62, 0xf8, 0xdd, 0xf1, 0xca, 0x58, 0x6a, 0x1c, 0xda
};
/* X963 SHA512 VECTOR */
static uint8_t x963_sha512_info[] = {
    /* SharedInfo for first vector - 16 bytes */
    0x1e, 0x60, 0xe5, 0x1c, 0x11, 0xa5, 0x38, 0xb0, 0xea, 0x89, 0x90, 0xd6, 0x9a, 0x4c, 0x63, 0x58
};
static uint8_t x963_sha512_key[] = {
    /* First vector Z (shared secret) - 65 bytes (128-byte output) */
    0x00, 0x9d, 0xcd, 0x6b, 0xa5, 0xc8, 0xc8, 0x03, 0xca, 0x21, 0xf9, 0x99, 0x6c, 0xa5, 0xdd, 0x86,
    0x04, 0x7d, 0x4d, 0xdc, 0x15, 0x0f, 0xdd, 0xac, 0xe1, 0xb1, 0xeb, 0xe9, 0x96, 0xc2, 0x00, 0x7e,
    0x3e, 0xe9, 0x07, 0xc8, 0xff, 0x03, 0xb9, 0xef, 0x76, 0x6e, 0x8c, 0xeb, 0x4d, 0xed, 0xf7, 0x48,
    0x9e, 0x51, 0x62, 0xe2, 0x27, 0x8c, 0x01, 0x85, 0xe4, 0xbe, 0x38, 0x1b, 0xec, 0x17, 0xdd, 0x99,
    0x2c, 0xf8
};
static uint8_t x963_sha512_key2[] = {
    /* Second vector Z (shared secret) - 24 bytes (16-byte output) */
    0x87, 0xfc, 0x0d, 0x8c, 0x44, 0x77, 0x48, 0x5b, 0xb5, 0x74, 0xf5, 0xfc, 0xea, 0x26, 0x4b, 0x30,
    0x88, 0x5d, 0xc8, 0xd9, 0x0a, 0xd8, 0x27, 0x82
};
static uint8_t x963_sha512_expectSecret[] = {
    /* First vector expected derived key - 128 bytes (1024 bits) */
    0x4e, 0x55, 0x03, 0x6a, 0x32, 0xf3, 0x2f, 0xc9, 0x65, 0x04, 0x6f, 0xdf, 0xbf, 0x68, 0x6c, 0x10,
    0x8e, 0x43, 0xa6, 0x9f, 0x8f, 0xc1, 0xa6, 0x4f, 0xf1, 0xbd, 0x77, 0x76, 0x3f, 0x2e, 0xed, 0xc8,
    0xbf, 0x27, 0x7d, 0x78, 0xb4, 0xce, 0x31, 0x24, 0x3e, 0x1a, 0xdb, 0xe2, 0xc2, 0xd5, 0xdd, 0x59,
    0xb4, 0x75, 0x03, 0xb5, 0xb9, 0x0b, 0x54, 0xf9, 0xd7, 0xa9, 0xa5, 0xae, 0xa4, 0x9c, 0x7f, 0x02,
    0x83, 0xcb, 0x64, 0xc3, 0x84, 0x9a, 0x1d, 0x15, 0x70, 0x00, 0xfd, 0x41, 0xef, 0x6c, 0x1d, 0x1a,
    0x5b, 0x62, 0x73, 0x4e, 0x7c, 0x9a, 0x20, 0xdc, 0xfb, 0x57, 0xf2, 0xda, 0x97, 0x49, 0x33, 0xf5,
    0x7e, 0xe6, 0x19, 0xd7, 0x28, 0x98, 0xd0, 0xe9, 0x3d, 0x9a, 0x42, 0x54, 0xaa, 0xdd, 0xf7, 0x39,
    0x41, 0xd6, 0x26, 0x92, 0x98, 0xb4, 0xd4, 0x9c, 0x0a, 0xc6, 0x4a, 0x33, 0x80, 0x2f, 0xe8, 0xf2
};
static uint8_t x963_sha512_expectSecret2[] = {
    /* Second vector expected derived key - 16 bytes (128 bits) */
    0x94, 0x76, 0x65, 0xfb, 0xb9, 0x15, 0x21, 0x53, 0xef, 0x46, 0x02, 0x38, 0x50, 0x6a, 0x02, 0x45
};

#endif